<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" />
    <title>押品搜索</title>
    <style>
    .table>tbody>tr>td{
        vertical-align: middle;
    }
    </style>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li class="active">
                        <span>押品搜索</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                押品搜索
            </h2>
        </div>
    </div>
</div>
<div class="content animate-panel">
    <div class="row">
        <g:form method="POST" controller="financialPledgeImport" action="searchImport"    class="form-horizontal" role="form">
            <div class="hpanel hblue">
                <div class="panel-heading">
                     <div class="panel-tools">
                        <button class="btn btn-primary btn-xs" type="submit"><i class="fa fa-search"></i>查询</button>
                        <button class="btn btn-warning2 btn-xs" type="button" id="resetBtn">
                            <i class="fa fa-times"></i>重置</button>
                    </div>
                    查询
                </div>
                    <div class="panel-body seach-group">
                     <div class="form-group col-md-4">
                            <label for="district" class="col-sm-3 control-label">登记人</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control"  id="registerFullName" name="registerFullName" value="${params?.registerFullName}" placeholder="请输入登记人">
                        </div>
                    </div>
            <div class="form-group col-md-4">
                <label for="district" class="col-sm-3 control-label">登记机构</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control"  id="registerAccount" name="registerAccount" value="${params?.registerAccount}" placeholder="请输入登记机构">
                </div>
            </div>
            <div class="col-sm-9" style="display: none">
                <input type="text" class="form-control"  id="id" name="id" value="${params?.id}">
            </div>
        </g:form>
    </div>
    </div>
        <div class="hpanel hgreen">
            <div class="panel-heading">
                全部押品
            </div>
            <div class="panel-body no-padding">
                <div class="table-responsive">
                    <table cellpadding="1" cellspacing="1" class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <g:sortableColumn property="id" title="单价（元）"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="evaluateStatue.name" title="总价（元）"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="estateStatus.name" title="抵押率%"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="cityName" title="动态抵押率%"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="districtName" title="直属管理机构"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="address" title="币种"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="buildArea" title="变现能力"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="address" title="价值波动性"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="buildArea" title="登记人"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="address" title="登记机构"  class="text-center" params="${params}"/>
                            <g:sortableColumn property="address" title="评估日期"  class="text-center" params="${params}"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${financialPledgeList}">
                            <tr class="text-center">
                                <td >${it?.unitPrice}</td>
                                <td>${it?.totalPrice}</td>
                                <td>${it?.ltv}</td>
                                <td>${it?.cltv}</td>
                                <td>${it?.account?.name}</td>
                                <td>${it?.currency?.name}</td>
                                <td>${it?.cashability?.name}</td>
                                <td>${it?.valueVolatility}</td>
                                <td>${it?.registerFullName}</td>
                                <td>${it?.registerAccount}</td>
                                <td>${it?.evaluateDate}</td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate total="${count ?: 0}" params="${params.count}"/>
                </div>
            </div>
        </div>

    </div>
    <g:javascript>
        $(function () {
            //重置按钮
            $("#resetBtn").click(function () {
                $("#address").val("");
                $("#s2id_status span:first").html("请选择押品状态");
                $("#status").val("");
            })
            //导入弹出
            /*$('table').find('tbody').find('tr').on('click', function() {
                window.location.href("sdfg.jsp")
            })*/
            $("a[name='state']").click(function(){
                var reason = $(this).attr("reason");
                swal({
                    title: "失败原因",
                    text: reason,
                    type: "error"
                });
            });
        })

        //日期控件调用
        /*$('#datepicker').datepicker({
            language: 'zh-CN'
        });*/
        //上传文件按钮
        /* $(".myFileUpload").change(function () {
             var arrs = $(this).val().split('\\');
             var filename = arrs[arrs.length - 1];
             $(".show").html(filename);
         });*/

    </g:javascript>

</body>
</html>
